package com.ciwong.epaper.modules.scan.dao;

import com.ciwong.mobilelib.utils.EAction;

/**
 * 扫一扫 相关Action
 *
 * @author bin
 * @version ciwong v.1.0 2015/7/23 20:02
 * @since ciwong v.1.0
 */
public class ScanAction extends EAction
{
    /**
     * 需要登录跳转
     */
    public static final String ACTION_JUMP_URL = "ciwong.com";
    /**
     *请求资源和品牌是否匹配 内网地址
     */

    public static final  String ACTION_GET_QR_BRAND_RESOURCE_INFO= HOST+"/v5/service/v2/getServiceId";

    /**
     * 根据二维码获取离线包信息
     */
    public static final String ACTION_GET_QR_RESOURCE_INFO = HOST
            + "/v2/package/qr_resource_info";
    /**
     * 根据二维码获取书籍信息
     */
    public static final String ACTION_GET_QR_BOOK_INFO = HOST
            + "/v1/package/package_info";

    /**
     * 根据二维码获取电子报品牌信息
     */
    public static final String ACTION_GET_QR_NEWSPAPER_BRAND = HOST
            + "/v1/package/qr_epaper_service";

    /**
     * 根据试卷编码获取试卷信息
     */
    public static final String ACTION_PAPER_CODE_BY_INFO = HOST
            + "/v1/epaperwork/paper_code_info";

    @Override
    public String getActionUrl(String s)
    {
        if (s.equals(ACTION_GET_QR_RESOURCE_INFO))
        {
            return ACTION_GET_QR_RESOURCE_INFO;
        }
        else if (s.equals(ACTION_GET_QR_NEWSPAPER_BRAND))
        {
            return ACTION_GET_QR_NEWSPAPER_BRAND;
        }
        else if (s.equals(ACTION_PAPER_CODE_BY_INFO))
        {
            return ACTION_PAPER_CODE_BY_INFO;
        }else if(s.equals(ACTION_GET_QR_BRAND_RESOURCE_INFO)){
            return ACTION_GET_QR_BRAND_RESOURCE_INFO;
        }else if(s.equals(ACTION_GET_QR_BOOK_INFO)){
            return ACTION_GET_QR_BOOK_INFO;
        }
        return super.getActionUrl(s);
    }
}
